package com.tourism.tourismGYM.dao;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.tourism.tourismGYM.entity.TourismRm;

@Repository
public interface TourismRmDao extends JpaRepository<TourismRm,String>{
	@Query("SELECT T FROM TourismRm T WHERE T.apmId = ?1")
	List<TourismRm> getByApmId(String id);
	@Query(nativeQuery = false,value = "select T from TourismRm T where T.applicant like %:applicant%" )
	Page<TourismRm> findPage(@Param("applicant")String applicant, Pageable pageable);

}
